<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        .box {
            height: 200px;
            background-color: #ccc;

        }
        .box > div {
            height: 100%;
            border: 2px solid red;
            box-sizing: border-box;
            float: left;
            width: 100%;
        }

        /* .demo {
            width: 100px;
            height: 100px;
            border:1px solid red;
            padding: 10px;
        } */
        /* min-width: 768px : 意思：大于768 */
        @media screen and (min-width: 768px) {
            .box > div {
                width: 50%;
            }
        }
        @media screen and (min-width: 992px) {
            .box > div {
                width: 33.33%;
            }
        }
        @media screen and (min-width: 1200px) {
            .box > div {
                width: 25%;
            }
        }
    </style>
</head>
<body>
    <!-- 需求：
        w<768 一行展示一个 div 100%
        w:768~992 一行展示2个div 50%
        w:992~1200 -行展示3个div 33.33%
        w>1200 展示4个 div 25%
    -->
    <div class="box">
        <div>1</div>
        <div>2</div>
        <div>3</div>
        <div>4</div>
        <div>5</div>
        <div>6</div>
    </div>

    <!-- <div class="demo"></div> -->
</body>
</html>